package com.jiashihui.schema_lgorithm.spring.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author jiashihui
 * @date 2019/03/22
 */
@Component("teacher")
public class Teacher {

    //@Resource(name = "student")//byName(or @Autowired @Qualifier(value = "student"))
    @Autowired//byType(or @Resource)
    private Student student;

    public Student getStudent() {
        return student;
    }
}
